package cn.silver.module.web.model;

import cn.silver.framework.core.validate.auth.SmsGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@Schema(name = "LoginSmsModel", title = "短信验证码登录对象")
public class LoginSmsModel {
    @Schema(title = "登录手机号")
    @Pattern(regexp = "1\\d{10}", message = "{auth.sms.mobile.error}")
    @NotBlank(message = "{auth.sms.mobile.blank}", groups = {SmsGroup.class})
    private String mobile;

    @Schema(title = "短信验证码")
    @NotBlank(message = "{auth.sms.code.blank}", groups = {SmsGroup.class})
    private String code;

}
